﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using egypt.Logic;
using egypt.Logic.Data;

namespace egypt.Web
{
    public partial class _Default : System.Web.UI.Page
    {
        DataAdapter da = null;

        protected void Page_Load(object sender, EventArgs e)
        {
            da = new DataAdapter(System.Configuration.ConfigurationManager.ConnectionStrings["egypt"].ConnectionString);
            int page = 0;
            List<News> tmpData = da.GetNewsList(2, 10, 1, out page);
            this.rep_c2.DataSource = tmpData;
            this.rep_c2.DataBind();
            tmpData = da.GetNewsList(3, 10, 1, out page);
            this.rep_c3.DataSource = tmpData;
            this.rep_c3.DataBind();
            tmpData = da.GetNewsList(4, 10, 1, out page);
            this.rep_c4.DataSource = tmpData;
            this.rep_c4.DataBind();
            tmpData = da.GetNewsList(5, 10, 1, out page);
            this.rep_c5.DataSource = tmpData;
            this.rep_c5.DataBind();

            List<Fuwu> tmpFuwu = da.GetFuwuList();
            this.rep_fuwu.DataSource = tmpFuwu;
            this.rep_fuwu.DataBind();

            List<country> tmpcountry = da.GetCountryList();
            this.dl_country.DataSource = tmpcountry;
            this.dl_country.DataBind();

        }

    }
}
